package fm.douban.app.control;

import fm.douban.model.Song;
import fm.douban.service.SongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 刘正星
 * @version 1.0.0
 * @ClassName SongControl.java
 * @Description TODO
 * @createTime 2020年11月17日 10:31:00
 */
@RestController
public class SongControl {
    @Autowired
    private SongService songService;
    @GetMapping("/getBySingerIds")
    public List<Song> getBySingerIds (@RequestParam("id")String id){
    List<String> singerIds = new ArrayList<>();
    singerIds.add(id);
    return songService.getBysingerIds(singerIds);
    }
}
